﻿using System;
using System.Collections.Generic;
using System.Web.UI;
using BluePortal.Medias.Core;

namespace BluePortal.QuikStart.UserControls
{
    public partial class Users : System.Web.UI.UserControl
    {
        IEnumerable<ChannelUser> userList;

        public IEnumerable<ChannelUser> UserList
        {
            get { return userList; }
            set { userList = value; }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                //if (userList != null)
                //{
                //    var userListOnline = from u in userList
                //                         where OnlineAdapter.instance.FindAll().Select(uo => uo.loginName).Contains(u.LoginName)
                //                         select u;
                //    RepeaterOnline.DataSource = userListOnline;
                //    RepeaterOnline.DataBind();
                //    var userListOffline = from u in userList
                //                          where !OnlineAdapter.instance.FindAll().Select(uo => uo.loginName).Contains(u.LoginName)
                //                          select u;
                //    RepeaterOffline.DataSource = userListOffline;
                //    RepeaterOffline.DataBind();
                //}
            }
        }
    }
}